package com.project.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping("add")
    public String add(String name, HttpServletRequest request){
        System.out.println("name="+name);
        String str = request.getParameter("name");

        return name+"添加成功"+str;
    }
}
